//
//  ZZCLoginWayController.m
//  ZZC-Finance
//
//  Created by mac on 2017/5/25.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "ZZCLoginWayController.h"
#import "ZZCGestureController.h"
#import "ZZCFingerprintController.h"

@interface ZZCLoginWayController ()
//指纹登录
@property (weak, nonatomic) IBOutlet UISwitch *fingerprintSwitch;
//手势登录
@property (weak, nonatomic) IBOutlet UISwitch *gestureSwitch;

@end

@implementation ZZCLoginWayController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.fingerprintSwitch.on = NO;
    [self.fingerprintSwitch addTarget:self action:@selector(fingerprintSwitchClick:) forControlEvents:UIControlEventValueChanged];
    self.gestureSwitch.on = NO;
    [self.gestureSwitch addTarget:self action:@selector(gestureSwitchClick:) forControlEvents:UIControlEventValueChanged];
}
//指纹登录
- (void)fingerprintSwitchClick:(UISwitch *)sender {
    if (sender.on) {
        ZZCLog(@"指纹登录-%d", sender.on);
        ZZCFingerprintController *finger = [ZZCFingerprintController new];
          [self.navigationController pushViewController:finger animated:YES];
    }
}
//手势登录
- (void)gestureSwitchClick:(UISwitch *)sender {
    if (sender.on) {
        ZZCLog(@"手势登录-%d", sender.on);
        ZZCGestureController *ges = [ZZCGestureController new];
        [self.navigationController pushViewController:ges animated:YES];
    }
}
- (IBAction)backClick {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
